import request from '/@/utils/request';

export function useRoleApi() {
    // 表格API+表单查询
		return{
            RoleTableApi: (params: object) => {
                return request({
                    url: '/api/admin/basic/roads',
                    method: 'get',
                    params,
                });
            },
            //添加
            RoleAddApi: (data: object) => {
                return request({
                    url: '/api/admin/basic/road',
                    method: 'post',
                    data,
                });
            },
            RoleEditApi: (data: object) => {
                return request({
                    url: '/api/admin/basic/road',
                    method: 'put',
                    data,
                });
            },
            RoleDelApi: (data: object) => {
                return request({
                    url: '/api/admin/basic/road',
                    method: 'delete',
                    data,
                });
            },
        }
}